USE [ALIBABA]
GO
/****** Object:  StoredProcedure [dbo].[SP_CAPNHATSANPHAMMUA]    Script Date: 27-Jun-13 10:17:25 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_CAPNHATSANPHAMMUA]
@TenSP nvarchar(50),
@MaDM int,
@SLCM int,
@HinhAnh varchar(50),
@MaTV int,
@ChiTiet nvarchar(500),
@TinhTrang int,
@MaSPMua int
AS
BEGIN
	update SANPHAMMUA
	set ChiTiet = @ChiTiet, 
		HinhAnh = @HinhAnh, 
		MaDanhMuc = @MaDM, 
		MaThanhVien = @MaTV, 
		SoLuongCanMua = @SLCM, 
		TenSP = @TenSP, 
		TinhTrang = 0, 
		NgayDang = GETDATE()
	where MaSPMua = @MaSPMua
END